package com.woniuxy.comsumer;

import com.rabbitmq.client.Channel;
import com.woniuxy.comsumer.form.UserRegMSG;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.Map;

@Component
@Slf4j
public class App {

//    @RabbitListener(queues = "user.queue.meg")
//    public void getMeg(UserRegMSG userRegMSG, Channel channel,
//                       @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag) throws IOException {
//        channel.basicAck(deliveryTag,true);
//        log.info("收到：{},确认：{}",userRegMSG,deliveryTag);
//    }
}
